# Maintainer: Niklas Meyer <derlinkman@gmail.com>
pkgname=dovecot-fts-flatcurve
pkgver=1.0.2
pkgrel=0
pkgdesc="Dovecot FTS Flatcurve plugin (Xapian)"
url="https://github.com/slusarz/dovecot-fts-flatcurve"
arch="all"
license="LGPL-2.1-or-later"
depends_dev="$pkgname=$pkgver-r$pkgrel"
depends="dovecot xapian-core"
makedepends="
	autoconf
	automake
	dovecot-dev
	icu-dev
	libtool
	xapian-core-dev
	"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/slusarz/dovecot-fts-flatcurve/archive/refs/tags/v$pkgver.tar.gz"

prepare() {
	default_prepare
	./autogen.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--disable-static
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
bed437a00b2d6347774028fac5ed7fe9632b71f83e72540684cbaf8b5e98666c9516936a6bb11146c9e0a56179beb2c46881a40c90deb002a573633bc79e507e  dovecot-fts-flatcurve-1.0.2.tar.gz
"
